
import urllib.request
import urllib.parse


url="https://movie.douban.com/j/chart/top_list?type=11&interval_id=100%3A90&action"
# formdata={"limit":"20","start":"0"} #
formdata={}
formdata['limit']="20"
formdata["start"]="0"
data=urllib.parse.urlencode(formdata).encode('utf-8') #编码
headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36"}
request=urllib.request.Request(url,headers=headers,data=data)#post,发起请求，传递data
print(urllib.request.urlopen(request).read().decode('utf-8'))